<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="ck" uri="http://ckeditor.com"%>  
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head>
<title>网络新闻应急性管理系统</title>

<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="/res/style/common.css">
<link rel="stylesheet" type="text/css" href="/res/style/admin.css">
<link rel="stylesheet" type="text/css" href="/res/style/addUser.css">
<script type="text/javascript" src="/res/script/menu.js"></script>
</head>

<body onload="addMenu();">
	<div class="MainDiv">
		<div class="AjustDiv">
			<jsp:include page="/page/admin/adminHeader.jsp"></jsp:include>
			<jsp:include page="/page/admin/adminLeft.html"></jsp:include>
			<!-- 内容部分 -->
			<div class="ContentDiv">
				<div class="DetailDiv">
					<form action="userManage.action?id=${user.username }&act=update" method="post">
						
						<div class="ItemDiv"><h2>更改用户信息</h2></div>
						<div class="ItemDiv">
							<table>
								<tr>
									<td colspan="6" style="text-align: left;">
										<h2>基本信息：</h2>
									</td>
								</tr>
								<tr>
									<td>
										<label>账号：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.username" value="${user.username }">
									</td>
									
									<td>
										<label>密码：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="password" name="user.password" value="${user.password }">
									</td>
									
									<td>
										<label>昵称：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.nickname" value="${user.nickname }">
									</td>
								</tr>
								<tr>
									<td>
										<label>等级：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" disabled="disabled" type="text" name="user.grade" value="${user.grade }">
									</td>
									
									<td>
										<label>主页：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.homepage" value="${user.homepage }">
									</td>
									
									<td>
										<label>注册时间：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" disabled="disabled" type="datetime" name="user.registerTime" value="${user.registerTime }">
									</td>
								</tr>
								<tr>
									<td>
										<label>状态：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.state" value="${user.state }">
									</td>
									
									<td>
										<label>属性：</label> 
									</td>
									<td>
										<select name="user.property">
											<option value="0">用户属性</option>
											<option value="1" <c:if test="${user.property == 1 }">selected="selected"</c:if>>普通用户</option>
											<option value="2" <c:if test="${user.property == 2 }">selected="selected"</c:if>>普通会员</option>
											<option value="3" <c:if test="${user.property == 3 }">selected="selected"</c:if>>高级会员</option>
									</select>
									</td>
									<td>
										<label>角色：</label> 
									</td>
									<td>
										<select name="user.role.id">
											<option value="1" <c:if test="${user.role.id == 1 }">selected="selected"</c:if>>高级管理员</option>
											<option value="2" <c:if test="${user.role.id == 2 }">selected="selected"</c:if>>管理员</option>
											<option value="3" <c:if test="${user.role.id == 3 }">selected="selected"</c:if>>采集员</option>
											<option value="4" <c:if test="${user.role.id == 4 }">selected="selected"</c:if>>VIP用户</option>
											<option value="5" <c:if test="${user.role.id == 5 }">selected="selected"</c:if>>普通用户</option>
					
										</select>
									</td>
								</tr>
							</table>
						</div>
						<div class="ItemDiv">
							<table>
								<tr>
									<td colspan="6" style="text-align: left;">
										<h2>详细信息：</h2>
									</td>
								</tr>
								<tr>
									<td>
										<label>姓名：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.userInfo.name" value="${user.userInfo.name }">
									</td>
									<td>
										<label>生日：</label>
									</td>
									<td>
									<!-- <fmt:formatDate value="${user.userInfo.birthday }" pattern="yyyy-M-d" /> -->
										<input class="EditTextStyle_1" name="user.userInfo.birthday" type="date" value="${user.userInfo.birthday}" />
									</td>
									<td>
										<label>个性签名：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.userInfo.signature" value="${user.userInfo.signature }">
									</td>
								</tr>
								<tr>
									<td>
										<label>故乡：</label> 
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.userInfo.nativePlace.country" value="${user.userInfo.nativePlace.country}">
									</td>
									<td>
										<label>所在地：</label> 
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.userInfo.location.country" value="${user.userInfo.location.country}" >
									</td>
									<td>
										<label>性别：</label>
									</td>
									<td>
										<select name="user.userInfo.gender">
												<option value="0" <c:if test="${user.userInfo.gender == '0' }">selected="selected"</c:if>>保密</option>
												<option value="1" <c:if test="${user.userInfo.gender == '1' }">selected="selected"</c:if>>男</option>
												<option value="2" <c:if test="${user.userInfo.gender == '2'}">selected="selected"</c:if>>女</option>
										</select>
									</td>
								</tr>
								
								<tr>
									<td>
										<label>邮箱：</label> 
									</td>
									<td>
										<input class="EditTextStyle_1" type="email" name="user.userInfo.email" value="${user.userInfo.email }">
									</td>
									<td>
										<label>电话：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="tel" name="user.userInfo.phone" value="${user.userInfo.phone }">
									</td>
									<td>
										<label>QQ：</label> 
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.userInfo.qq" value="${user.userInfo.qq }">
									</td>
								</tr>
						
								<tr>
									<td>
										<label>工作单位：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.userInfo.assistInfo.workUnit" value="${user.userInfo.assistInfo.workUnit }">
									</td>
									<td>
										<label>职业：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.userInfo.assistInfo.profession" value="${user.userInfo.assistInfo.profession }">
									</td>
									<td>
										<label>职位：</label>
									</td>
									<td>
										<input class="EditTextStyle_1" type="text" name="user.userInfo.position" value="${user.userInfo.assistInfo.position }">
									</td>
								</tr>
							</table>
						</div>
						<div class="ItemDiv">
							<div style="text-align:left;padding:5px;">
								<button type="submit" onclick="">提交</button>
								<button type="reset" onclick="">重置</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
	<jsp:include page="/page/admin/adminFooter.html"></jsp:include>
</body>
</html>
